package com.cysyz.mylib.hibernatedao;

import javax.persistence.*;

/**
 * Created by cuiyong on 2014/12/27.
 */
@Entity
public class Organization extends BaseEntity{
    @Column
    private String name;
    @Column
    private String address;

    @ManyToOne(cascade={CascadeType.REFRESH},optional=false)
    @JoinColumn(name="city_id")
    private City city;
    public String getName() {
        return name;
    }

    public void setName(String name) {
        this.name = name;
    }

    public String getAddress() {
        return address;
    }

    public void setAddress(String address) {
        this.address = address;
    }

    public City getCity() {
        return city;
    }

    public void setCity(City city) {
        this.city = city;
    }
}
